<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<title>无标题文档</title>

	<link href="/yilianti/Public/Admin/css/style.css" rel="stylesheet" type="text/css" />
	<link href="/yilianti/Public/Admin/css/page.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/yilianti/Public/Admin/js/jquery.js"></script>
	<script type="text/javascript" src="/yilianti/Public/Admin/js/jquery.idTabs.min.js"></script>
	<script type="text/javascript" src="/yilianti/Public/Admin/js/select-ui.min.js"></script>
	
	<!-- 日历引入 -->
	<link href="/yilianti/Public/Admin/css/calendar.css" rel="stylesheet" type="text/css" />

	<!--文字编辑器引入-->
	<script type="text/javascript" charset="utf-8" src="/yilianti/Public/kindeditor/kindeditor-min.js"></script>
	<script type="text/javascript" charset="utf-8" src="/yilianti/Public/kindeditor/lang/zh_CN.js"></script>
	<link href="/yilianti/Public/kindeditor/themes/default/default.css" rel="stylesheet" type="text/css" />

	<script src="/yilianti/Public/Admin/js/layer/layer.js"></script>



</head>

<body>

	<div class="place">

		<span>位置：</span>

		<ul class="placeul">

		<li><a href="/yilianti/admin.php/Index/right">首页</a></li>

		<li><a href="#">修改疾病分类</a></li>

		</ul>

    </div>


    <div class="formbody">
		<div class="formtitle"><span>修改</span></div>
		<form action="" method="post" enctype="multipart/form-data" name="myform" id="ajaxForm">
		<ul class="forminfo">
		<input type="hidden" name="id" value="<?php echo ($list["id"]); ?>" />
			<li><label>医院名称:</label><input name="name" class="dfinput" type="text" value="<?php echo ($list["name"]); ?>"><i></i></li>
			<li><label>账号:</label><input name="phone" class="dfinput" type="text" value="<?php echo ($list["phone"]); ?>" readonly="readonly"><i></i></li>
			<li><label>积分:</label><input name="integral" class="dfinput" type="text" value="<?php echo ($list["integral"]); ?>"><i></i></li>
			<li><label>医院地址:</label><input name="address" class="dfinput" type="text" value="<?php echo ($list["address"]); ?>"><i></i></li>
			<li><label>联系人:</label><input name="contacts" class="dfinput" type="text" value="<?php echo ($list["contacts"]); ?>"><i></i></li>
			<li><label>电话:</label><input name="tel" class="dfinput" type="text" value="<?php echo ($list["tel"]); ?>"><i></i></li>
			<li><label>邮箱:</label><input name="email" class="dfinput" type="text" value="<?php echo ($list["email"]); ?>"><i></i></li>
			<li><label>级别:</label><input name="level" type="radio" value="1" <?php if($list["level"] == 1): ?>checked="checked"<?php endif; ?>>一级<i></i> &nbsp;&nbsp;&nbsp;&nbsp;
				<input name="level" type="radio" value="2" <?php if($list["level"] == 2): ?>checked="checked"<?php endif; ?>>二级<i></i>&nbsp;&nbsp;&nbsp;&nbsp;
				<input name="level" type="radio" value="3" <?php if($list["level"] == 3): ?>checked="checked"<?php endif; ?>>三级<i></i></li>
			<li>
				<label>省份:</label>
				<select name="province_id" id="pro_id">
					<option value="0">请选择省份</option>
					<?php if(is_array($prolist)): foreach($prolist as $key=>$vo): ?><option value="<?php echo ($vo['id']); ?>" <?php if($list['province_id'] == $vo['id']): ?>selected="selected"<?php endif; ?>><?php echo ($vo['name']); ?></option><?php endforeach; endif; ?>
				</select>
			</li>
			<li><label>原图:</label><img src="<?php echo ($list["pic"]); ?>" style="width:100px;"><i></i></li>
			<li><label>图片:</label><input type="text" class="dfinput" id="titlepic" name="pic" value="<?php echo ($list["pic"]); ?>" />
				<input type="button" id="uploadbtn" value="选择图片" style="height:30px;width:80px;cursor:pointer;border-radius:2px;background-color:#DDD;" /><i>限jpg gif jpeg png 格式 200kb以内</i></li>
			<li><label>简介:</label><textarea name="content" class="textinput" style="height: 80px"><?php echo ($list["content"]); ?></textarea><i></i></li>
			<li><label>&nbsp;</label><input  type="button" class="btn" id="mod" value="确认修改"/></li>

		</ul>
		</form>
    </div>
	<script type="text/javascript">
        $("#mod").click(function(){
            var pro_id = $("#pro_id option:selected");
            if(pro_id.val() == 0){
                layer.open({content: '请选择省份',time: 3});
                return false;
			}
            $.ajax({
                type:'post',
                url:'/yilianti/admin.php/Doctor/hospitalmod',
                data:$('#ajaxForm').serialize(),
                cache:false,
                dataType:'json',
                success:function(res){
                    if(res.code == 0){
                        layer.open({content: res.msg,time: 3});
                        window.location.href = res.url;
                    }else{
                        layer.open({content: res.msg,time: 3});
                    }
                }
            });
        });
	</script>


<script type="text/javascript">
KindEditor.ready(function(K) {
	K.create('#pagecontent', {
		allowFileManager : true
	});

	var editor = K.editor({
		allowFileManager : true
	});
	//上传图片（本地、网络）
	K('#uploadbtn').click(function() {
		editor.loadPlugin('image', function() {
			editor.plugin.imageDialog({
				showRemote : false,
				imageUrl : K('#titlepic').val(),
				clickFn : function(url, title, width, height, border, align) {
					K('#titlepic').val(url);
                    K('#showimg').attr('src',url);
                    K('#titlepicpreview').attr('src', url);
					editor.hideDialog();
				}
			});
		});
	});

	//文件上传
	K('#insertfile').click(function() {
		editor.loadPlugin('insertfile', function() {
			editor.plugin.fileDialog({
				fileUrl : K('#fileurl').val(),
				clickFn : function(url, title) {
					K('#fileurl').val(url);
					editor.hideDialog();
				}
			});
		});
	});
});
/*//实例化编辑器
	var editor = K.editor({
		allowFileManager : true
	});

	//文件上传
	K('#insertfile').click(function() {
		editor.loadPlugin('insertfile', function() {
			editor.plugin.fileDialog({
				fileUrl : K('#url').val(),
				clickFn : function(url, title) {
					K('#url').val(url);
					editor.hideDialog();
				}
			});
		});
	});
	
	//上传图片（本地、网络）
	K('#image1').click(function() {
		editor.loadPlugin('image', function() {
			editor.plugin.imageDialog({
				imageUrl : K('#url1').val(),
				clickFn : function(url, title, width, height, border, align) {
					K('#url1').val(url);
					editor.hideDialog();
				}
			});
		});
	});
});
//批量上传图片
KindEditor.ready(function(K) {
	var editor = K.editor({
		allowFileManager : true
	});
	K('#J_selectImage').click(function() {
		editor.loadPlugin('multiimage', function() {
			editor.plugin.multiImageDialog({
				clickFn : function(urlList) {
					var div = K('#J_imageView');
					div.html('');
					K.each(urlList, function(i, data) {
						div.append('<img src="' + data.url + '">');
					});
					editor.hideDialog();
				}
			});
		});
	});
});*/
</script>

</body>
</html>